package com.xinqi.modules.course.clazz.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.course.clazz.domain.ClassParentGroupStudentEntity;
import com.xinqi.modules.course.clazz.dto.req.ClassParentGroupStudentCreateDTO;
import com.xinqi.modules.course.clazz.dto.req.ClassParentGroupStudentUpdateDTO;
import com.xinqi.modules.course.clazz.dto.rsp.ClassParentGroupStudentResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 班级父分组人员表，该表的作用是为了保证在并发情况下每个父分组下的成员不重复转换
 *
 * @author: system
 * @date: 2023/05/21
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class ClassParentGroupStudentConvert {
    public abstract ClassParentGroupStudentEntity create(ClassParentGroupStudentCreateDTO s);

    public abstract ClassParentGroupStudentEntity update(ClassParentGroupStudentUpdateDTO s, @MappingTarget ClassParentGroupStudentEntity t);

    public abstract ClassParentGroupStudentEntity update(ClassParentGroupStudentUpdateDTO s);

    public abstract ClassParentGroupStudentResultDTO convert(ClassParentGroupStudentEntity s);
}
